import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
  mode: "history",
  base: process.env.BASE_URL,
  routes: [
    {
      path: "/Home",
      component: resolve => require(["components/Home.vue"], resolve),
      meta: { title: "首页模板" },
      children: [
        // 学生管理
        {
          path: "/",
          component: resolve => require(["views/Index.vue"], resolve),
          meta: { title: "首页" }
        },
        {
          path: "/ClassManage",
          component: resolve =>
            require(["views/PersonManage/ClassManage.vue"], resolve),
          meta: { title: "班级管理" }
        },
        {
          path: "/StudentInfo",
          component: resolve =>
            require(["views/PersonManage/StudentInfo.vue"], resolve),
          meta: { title: "学生信息" }
        },
        {
          path: "/BulkImport",
          component: resolve =>
            require(["views/PersonManage/BulkImport.vue"], resolve),
          meta: { title: "批量导入" }
        },
        {
          path: "/BulkSwitch",
          component: resolve =>
            require(["views/PersonManage/BulkSwitch.vue"], resolve),
          meta: { title: "批量调班" }
        },
        {
          path: "/GraduateSelect",
          component: resolve =>
            require(["views/PersonManage/GraduateSelect.vue"], resolve),
          meta: { title: "毕业查询" }
        },
        {
          path: "/CardManage",
          component: resolve =>
            require(["views/PersonManage/CardManage.vue"], resolve),
          meta: { title: "卡号管理" }
        },
        {
          path: "/StudentReport",
          component: resolve =>
            require(["views/PersonManage/StudentReport.vue"], resolve),
          meta: { title: "学生报表" }
        },
        // 教工管理
        {
          path: "/StaffInfo",
          component: resolve =>
            require(["views/StaffManage/StaffInfo.vue"], resolve),
          meta: { title: "教工信息" }
        },
        // 微信注册查询
        {
          path: "/WeChatRegister",
          component: resolve =>
            require(["views/WeChatReg/WeChatRegister.vue"], resolve),
          meta: { title: "微信注册查询" }
        },
        // 考勤管理
        {
          path: "/WeChatRegister",
          component: resolve =>
            require(["views/WeChatReg/WeChatRegister.vue"], resolve),
          meta: { title: "微信注册查询" }
        },
        {
          path: "/ManualPunch",
          component: resolve =>
            require(["views/AttenDance/ManualPunch.vue"], resolve),
          meta: { title: "手工打卡" }
        },
        {
          path: "/OnlineLeave",
          component: resolve =>
            require(["views/AttenDance/OnlineLeave.vue"], resolve),
          meta: { title: "在线请假" }
        },
        {
          path: "/KitchenSelect",
          component: resolve =>
            require(["views/AttenDance/KitchenSelect.vue"], resolve),
          meta: { title: "后厨查询" }
        },
        {
          path: "/ScreenLive",
          component: resolve =>
            require(["views/AttenDance/ScreenLive.vue"], resolve),
          meta: { title: "大屏直播" }
        },
        // 学生考勤
        {
          path: "/Student/SchoolStatistical",
          component: resolve =>
            require([
              "views/AttenDance/StudentAttenDance/SchoolStatistical.vue"
            ], resolve),
          meta: { title: "在校统计" }
        },
        {
          path: "/Student/AttenDanceDetail",
          component: resolve =>
            require([
              "views/AttenDance/StudentAttenDance/AttenDanceDetail.vue"
            ], resolve),
          meta: { title: "考勤明细" }
        },
        {
          path: "/Student/AttenDanceStatistical",
          component: resolve =>
            require([
              "views/AttenDance/StudentAttenDance/AttenDanceStatistical.vue"
            ], resolve),
          meta: { title: "考勤统计" }
        },
        // 教工考勤
        {
          path: "/Staff/AttenDanceSetting",
          component: resolve =>
            require([
              "views/AttenDance/StaffAttenDance/AttenDanceSetting.vue"
            ], resolve),
          meta: { title: "考勤设置" }
        },
        {
          path: "/Staff/SchoolStatistics",
          component: resolve =>
            require([
              "views/AttenDance/StaffAttenDance/SchoolStatistics.vue"
            ], resolve),
          meta: { title: "在校统计" }
        },
        {
          path: "/Staff/AttenDanceDetail",
          component: resolve =>
            require([
              "views/AttenDance/StaffAttenDance/AttenDanceDetail.vue"
            ], resolve),
          meta: { title: "考勤明细" }
        },
        {
          path: "/Staff/AttenDanceStatistical",
          component: resolve =>
            require([
              "views/AttenDance/StaffAttenDance/AttenDanceStatistical.vue"
            ], resolve),
          meta: { title: "考勤统计" }
        },
        // 设备管理
        {
          path: "/Equip/DoorMachine",
          component: resolve =>
            require(["views/EquipManage/DoorMachine.vue"], resolve),
          meta: { title: "门口机" }
        },
        // 通知
        {
          path: "/Notice",
          component: resolve => require(["views/Notice.vue"], resolve),
          meta: { title: "通知" }
        },
        // 系统设置
        {
          path: "/usersSetting",
          name: "用户设置",
          component: resolve =>
            require(["views/Setting/UsersSetting/UsersSetting.vue"], resolve),
          meta: { title: "用户设置" }
        },
        // icbc 工行
        {
          path: "/icbcOrder",
          name: "工行订单",
          component: resolve =>
            require(["views/Icbc/IcbcOrder.vue"], resolve),
          meta: { title: "工行订单" }
        },
        // echart
        {
          path: "/accessRecords",
          name: "出入记录",
          component: resolve =>
            require(["views/AccessRecords/AccessRecords.vue"], resolve),
          meta: { title: "出入记录" }
        }
      ]
    },
    {
      path: "/",
      component: resolve => require(["views/Login.vue"], resolve),
      meta: { title: "登录" }
    },
    {
      path: "/login",
      component: resolve => require(["views/Login.vue"], resolve),
      meta: { title: "登录" }
    }
  ]
});
